﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_MasterPages/layout.Master" AutoEventWireup="true" CodeBehind="RSViewInventoryPart.aspx.cs" Inherits="mojoPortal.Web.RS.SBM.RSViewInventoryPart" %>
<%@ Register Src="~/rs/controls/modalactionmessagecontrol.ascx" TagName="ModalActionMessageControl" TagPrefix="uc1" %>
<%@ Register Src="controls/modalproductcontrol.ascx" TagName="ModalProductControl" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="leftContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">

<br />

<table width="100%">
<tr>
<td>Category:<asp:DropDownList ID="ddlInventoryCategory" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlInventoryCategory_OnSelectedIndexChanged"></asp:DropDownList>
&nbsp;&nbsp;
<asp:Button ID="btnAddInventory" runat="server" Text="New Part" onclick="btnAddInventory_Click" />
</td>
</tr>
</table>

<div class="page">
<asp:GridView ID="gvInventoryParentList" runat="server" AutoGenerateColumns="False" 
        AllowPaging="True" CellPadding="4" AllowSorting="True" OnRowDataBound="gvInventoryParentList_OnRowDataBound"
        ForeColor="#333333" GridLines="None" Width="100%">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="ProductName" HeaderText="Category Name" SortExpression="ProductName" HeaderStyle-HorizontalAlign="Left"/>
            <asp:TemplateField HeaderText="Category Items" HeaderStyle-HorizontalAlign="Left">
            <ItemTemplate>
            <asp:GridView ID="gvInventoryChildList" runat="server" AutoGenerateColumns="False" 
                    AllowPaging="True" CellPadding="4" AllowSorting="True" 
                    ForeColor="#333333" GridLines="None" Width="100%" >
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                    <asp:TemplateField HeaderText="ProductName" HeaderStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkEditInventoryItem" CommandArgument='<%# Eval("productid") %>' OnCommand="gvInventoryItem_Edit" runat="server" CausesValidation="false">
                        <asp:Image runat="server" ID="editImage" ImageUrl="~/RS/Images/edit.gif" AlternateText="Edit" />
                        </asp:LinkButton>
                        <asp:Label ID="lblProductName" runat="server" Text='<%# Eval("ProductName") %>'></asp:Label>
                    </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ProductId" HeaderText="Product ID" SortExpression="ProductId" HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Left"/>
                    <asp:BoundField DataField="UnitsInStock" HeaderText="Units In Stock" SortExpression="UnitsInStock" HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Left"/>
                    <asp:BoundField DataField="UnitPrice" HeaderText="Unit Price" SortExpression="UnitPrice" HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Left"/>
                    <asp:BoundField DataField="ModelNo" HeaderText="Model Number" SortExpression="ModelNo" HeaderStyle-Width="200px" HeaderStyle-HorizontalAlign="Left"/>
                    </Columns>
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#89A8E0" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#89A8E0" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    <EmptyDataTemplate><br />
                    <asp:Label ID="lblNoRecordFound" runat="server" Text="There Are No Inventory Item For This Category" ForeColor="Silver" Font-Bold="True"></asp:Label>
                    </EmptyDataTemplate>
                </asp:GridView>
            </ItemTemplate>
            </asp:TemplateField>

        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        <EmptyDataTemplate><br />
        <center><asp:Label ID="lblNoRecordFound" runat="server" Text="There Are No Inventory Category" ForeColor="Silver" Font-Bold="True"></asp:Label></center>
        </EmptyDataTemplate>
    </asp:GridView>
</div>
<uc1:ModalActionMessageControl ID="ucModalActionMessageControl" runat="server"/>
<uc1:ModalProductControl ID="ucModalProductControl" runat="server" />

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="rightContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="pageEditContent" runat="server">
</asp:Content>
